package com.ereport.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


@Entity
@Table(name = "executives")
public class Executives implements Serializable {
	

	@Id
	@GeneratedValue(generator="increment")
	@GenericGenerator(name="increment", strategy = "increment")
	private int id;
	
	@Column(name="exe_name")
	private String exeName;
	@Column(name="exe_email")
	private String exeEmail;
	private String pwd;
	private String phone;
	@Column(name="present_address")
	private String presaddress;
	@Column(name="permanent_address")
	private String permaddress;
	private String gender;
	@Column(name="created_date")
	private Date createdDate;
	private boolean is_admin;
	
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "exe_id", referencedColumnName = "id")
	private Set<LoginDet> logdt= new HashSet<LoginDet>();
	
	

	public Set<LoginDet> getLogdt() {
		return logdt;
	}
	public void setLogdt(Set<LoginDet> logdt) {
		this.logdt = logdt;
	}

	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "exe_id", referencedColumnName = "id")
	private Set<DailyActivity> dailyAct = new HashSet<DailyActivity>();
	
	public Executives(){
		
	}
	public Executives(int exid,String exname, String permaddress,String presaddress, String exeEmail2,
			String exePass, String exePhone, String exeGender, Date dt) {
		this.id=exid;
		this.exeName=exname;
		this.permaddress=permaddress;
		this.presaddress=presaddress;
		this.exeEmail=exeEmail2;
		this.pwd=exePass;
		this.phone=exePhone;
		this.gender=exeGender;
		this.createdDate=dt;
		
	}
	public Executives(String exname, String permaddress,String presaddress, String exeEmail2,
			String exePass, String exePhone, String exeGender, Date dt) {
		this.exeName=exname;
		this.permaddress=permaddress;
		this.presaddress=presaddress;
		this.exeEmail=exeEmail2;
		this.pwd=exePass;
		this.phone=exePhone;
		this.gender=exeGender;
		this.createdDate=dt;
	}
	
	public Set<DailyActivity> getDailyAct() {
		return dailyAct;
	}
	public void setDailyAct(Set<DailyActivity> dailyAct) {
		this.dailyAct = dailyAct;
	}
	
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "exe_id", referencedColumnName = "id")
	private Set<Opportunity> opp = new HashSet<Opportunity>();
	
	public Set<Opportunity> getOpp() {
		return opp;
	}
	public void setOpp(Set<Opportunity> opp) {
		this.opp = opp;
	}
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "exe_id", referencedColumnName = "id")
	private Set<BudgetPlanner> bp = new HashSet<BudgetPlanner>();
	public Set<BudgetPlanner> getBp() {
		return bp;
	}
	public void setBp(Set<BudgetPlanner> bp) {
		this.bp = bp;
	}
	
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "exe_id", referencedColumnName = "id")
	private Set<Expenses> Exp = new HashSet<Expenses>();
	public Set<Expenses> getExp() {
		return Exp;
	}
	public void setExp(Set<Expenses> Exp) {
		this.Exp = Exp;
	}
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "exe_id", referencedColumnName = "id")
	private Set<Accounts> acnt = new HashSet<Accounts>();
	
	public Set<Accounts> getAcnt() {
		return acnt;
	}
	public void setAcnt(Set<Accounts> acnt) {
		this.acnt = acnt;
	}
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "exe_id", referencedColumnName = "id")
	private Set<ADP> adp = new HashSet<ADP>();
	
	public Set<ADP> getAdp() {
		return adp;
	}
	public void setAdp(Set<ADP> adp) {
		this.adp = adp;
	}
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "admin_id", referencedColumnName = "id")
	private Set<AdminExeBudget> adminid = new HashSet<AdminExeBudget>();
	
	public Set<AdminExeBudget> getAdminid() {
		return adminid;
	}
	public void setAdminid(Set<AdminExeBudget> adminid) {
		this.adminid = adminid;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getExeName() {
		return exeName;
	}
	public void setExeName(String exeName) {
		this.exeName = exeName;
	}
	public String getExeEmail() {
		return exeEmail;
	}
	public void setExeEmail(String exeEmail) {
		this.exeEmail = exeEmail;
	}
	public String getPwd() {
		return pwd;
	}
	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
	public boolean isIs_admin() {
		return is_admin;
	}
	public void setIs_admin(boolean is_admin) {
		this.is_admin = is_admin;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	public String getPresaddress() {
		return presaddress;
	}
	public void setPresaddress(String presaddress) {
		this.presaddress = presaddress;
	}
	public String getPermaddress() {
		return permaddress;
	}
	public void setPermaddress(String permaddress) {
		this.permaddress = permaddress;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public Date getCreatedDate() {
		return createdDate;
	}
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}
	
	
	
}
